<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            perspective: 500px;
        }
        .box {
            position: relative;
            margin: 100px auto;
            transform-style: preserve-3d;
            width: 300px;
            height: 300px;
            transition: all .3s;
        }
        .box div {
            position: absolute;
            width: 300px;
            height: 300px;
            top: 0;
            left: 0;
            line-height: 300px;
            text-align: center;
            font-size: 20px;
            border-radius: 50%;
            
        }
        .box:hover {
            transform: rotateY(180deg);
        }
        .first {
            background-color: pink;
            z-index: 1;
        }
        .last {
            background-color: yellow;
            transform: rotateY(180deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="first">giao</div>
        <div class="last">呀呼</div>
    </div>
</body>
</html>